package com.ywu.application.standard.redisCache.api;

import com.ywu.common.result.CommonResult;
import com.ywu.application.standard.redisCache.service.YwuOverviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName YwuOverviewApi
 * @Description TODO
 * @Author GroundDemo
 * @Date 2025/3/24 12:22
 * @Version 1.0
 **/
@RestController
@RequestMapping("/ywu/redis/overView")
public class YwuOverviewApi {

    @Autowired
    private YwuOverviewService service;

    /**
    * @Author GroundDemo
    * @Description 首页PV、UV、接口访问情况查询
    * @Date 16:34 2025/3/24
    * @Param []
    * @return com.ywu.common.result.CommonResult<java.lang.Object>
    **/
    @PostMapping("/overView.control.info")
    public CommonResult<Object> overView() {
        return service.overView();
    }

    /**
    * @Author GroundDemo
    * @Description 当日访问总量top10
    * @Date 21:10 2025/3/24
    * @Param []
    * @return com.ywu.common.result.CommonResult<java.lang.Object>
    **/
    @PostMapping("/overView.control.api.visit.top.10.info")
    public CommonResult<Object> overViewApiVisitTop10() {
        return service.overViewApiVisitTop10();
    }
}
